package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 缆段 实体
 * </p>
 *
 * @author ping
 * @since 2020-07-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "FibreCable对象", description = "缆段")
public class FibreCable extends Model<FibreCable> {

    private static final long serialVersionUID = 1L;

    // "自增id")
    @TableId(value = "cable_id", type = IdType.AUTO)
    private Integer cableId;

    // "光缆id")
    private Integer fibreId;

    // "缆段名称")
    private String cableName;

    // "缆段编码")
    private String cableCode;

    // "缆段长度(km)")
    private BigDecimal cableLength;

    // "光缆芯数")
    private Integer corenum;

    // "起始站点id")
    private Integer startEquipmentroomId;

    // "终止站点id")
    private Integer endEquipmentroomId;

    // "部门id")
    private Integer deptId;

    // "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    // "创建人")
    private String createBy;

    @TableField(exist = false)
    private String fibreName;

    @Override
    public Serializable pkVal() {
        return this.cableId;
    }

}
